﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GatewayFysioWeb;
using ClassLibrary;


namespace GatewayFysioWeb
{
    public partial class UserContent : System.Web.UI.Page
    {
        private ClassLibrary.GatewayUserContent usercontentgateway;

        protected void Page_Load(object sender, EventArgs e)
        {
            usercontentgateway = new GatewayUserContent();
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            string cpr = txtCpr.Text;
            string description = txtDescription.Text;

            ClassLibrary.UserContent usercontent = new ClassLibrary.UserContent(cpr, description);
            usercontentgateway.Create(usercontent);

            lblResult.Text = "<img src=http://localhost:1841/man.jpg>";
        }

        protected void btnDisplay_Click(object sender, EventArgs e)
        {
            GatewayUserContent gateway = new GatewayUserContent();
            gateway.LoadAll();
        }

    }
}